class GamesController < ApplicationController
	def index
		@games = Game.all
		@pairs = Pair.all
		@players = Player.all
	end
	def purge
		Game.destroy_all
		Pair.destroy_all
		redirect_to games_path
	end
	def reset_scores
		Pair.all.each do |pair|
			pair.update_attributes({:created_at=>"2012-02-24 17:46:40",:score=>0, :updated_at=>"2012-02-24 17:46:40"})
		end
		redirect_to games_path
	end
	def randomize
		Game.randomize
		redirect_to games_path
	end
end
